﻿using System;
using System.Data.Entity;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZSZ.IService;
using ZSZ.Model;

namespace ZSZ.Service
{
    public partial class SettingService : BaseService<Setting>, ISettingService
    {
        public string GetValue(string name)
        {
            var setting = GetAll().AsNoTracking().SingleOrDefault(s => s.Name == name);
            if (setting == null)//没有
            {
                return null;
            }
            else
            {
                return setting.Value;
            }
        }
    }
}
